package com.zbkj.dal.base.enums.show;

/**
 * @author JXY
 */
public class EnumShowVO<T> {
    private T code;

    private String desc;

    public T getCode() {
        return code;
    }

    public void setCode(T code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static <T> EnumShowVO<T> generate(EnumInterface<T> enumInterface) {
        EnumShowVO<T> enumShowVO = new EnumShowVO<T>();
        enumShowVO.setCode(enumInterface.code());
        enumShowVO.setDesc(enumInterface.desc());
        return enumShowVO;
    }
}
